package oa.base.session;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
/**
 * 登录的 session 验证
 * @author lilang
 *
 */
public class SessionCheck extends AbstractInterceptor{

	/**
	 * 
	 */
	private static final long serialVersionUID = -1914610899953607092L;

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		
		Object user = SessionManger.getSessionUser();
		if(null==user){
			return "login";
		}else{
			return invocation.invoke();
		}
		
	}

	
	
}
